package cn.virens.common.boot.dubbo.util;

import org.dromara.hutool.core.convert.ConvertUtil;
import org.dromara.hutool.core.date.DateUtil;

public class TimeCompareUtil {

    public static boolean expire(long time, long diff) {
        return time + diff < DateUtil.current();
    }

    public static boolean expire0(Object time, long diff) {
        return expire(ConvertUtil.toLong(time, 0L), diff);
    }
}
